package org.example.springbootdemo;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@SpringBootApplication
public class SpringBootDemoApplication {

    public static void main(String[] args) {
        System.out.println("Hello World SpringBoot Application");
        //SpringApplication.run(SpringBootDemoApplication.class, args);

        //关闭Banner
        SpringApplication application = new SpringApplication(SpringBootDemoApplication.class);
        application.setBannerMode(Banner.Mode.OFF);
        application.run(args);
    }


    @RequestMapping("hello")
    @ResponseBody
    public String hello() {
        return "hello world！" + System.currentTimeMillis();
    }

    @RequestMapping("hello1")
    @ResponseBody
    public String hello1() {
        return "{hello world！1}" + System.currentTimeMillis();
    }

}
